<div class="page-title clearfix">
  <div class="title">平台充值激活币记录</div>
</div>

<div class="panel panel-body">
  <!--搜索 start-->
  <form nz-form (submit)="getActiveRecordList(1)">
    <div class="search-group">
      <span class="search-title">账号：</span>
      <div class="search-main">
        <input nz-input name="account"
               [(ngModel)]="searchParams.account"
               placeholder="请输入账号">
      </div>
    </div>
    <div class="search-group">
      <span class="search-title">时间区间：</span>
      <div class="search-main" style="width: 250px;">
        <nz-range-picker name="time" [(ngModel)]="searchParams.time" (ngModelChange)="dateChange($event)" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
      </div>
    </div>
    <div class="inline-block">
      <button nz-button class="ml-20 mr" [nzType]="'primary'" title="搜索" type="submit">
        <i class="anticon anticon-search"></i><span>搜索</span>
      </button>
      <button nz-button class="mr" title="重置" type="reset" (click)="resetSearch()">
        <i class="anticon anticon-sync"></i><span>重置</span>
      </button>
    </div>
  </form>
  <!--搜索 end-->
</div>

<div class="panel">
  <nz-table #nzTable
            [nzData]="activeRecordList.voList"
            [nzLoading]="_loading"
            [nzFrontPagination]="false"
            [nzShowTotal]="totalRow"
            [nzPageSize]="activeRecordList.pageSize"
            [nzTotal]="activeRecordList.totalRow"
            [nzPageIndex]="activeRecordList.curPage"
            (nzPageIndexChange)="getActiveRecordList($event)">
    <thead nz-thead>
    <ng-template #totalRow>共 {{activeRecordList.totalRow}} 条数据</ng-template>
    <tr>
      <th nz-th class="text-center" nzWidth="10%"><span>序号</span></th><!--序号-->
      <th nz-th class="text-center" nzWidth="15%"><span>账户</span></th><!--账户-->
      <th nz-th class="text-center" nzWidth="10%"><span>数量</span></th><!--数量-->
      <th nz-th class="text-center" nzWidth="45%"><span>描述</span></th><!--描述-->
      <th nz-th class="text-center" nzWidth="20%"><span>时间</span></th><!--时间-->
    </tr>
    </thead>
    <tbody nz-tbody>
    <ng-template ngFor let-data [ngForOf]="nzTable.data" let-i="index">
      <tr nz-tbody-tr>
        <td nz-td class="text-center">{{i+1}}</td>
        <td nz-td class="text-center">{{data.account}}</td>
        <td nz-td class="text-center">{{data.activeCode}}</td>
        <td nz-td class="text-center">{{data.summary}}</td>
        <td nz-td class="text-center font12">{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
      </tr>
    </ng-template>
    </tbody>
  </nz-table>
</div>
